package com.ly.mpayment.persist.entity.yidong;


import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 * MobileOrders entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="mobile_orders"

)

public class MobileOrders  implements java.io.Serializable {


    // Fields

     private String mobileOrdersId;
     private NumberPool numberPool;
     private BigDecimal chargeMoney;
     private Date systemTime;
     private String phoneNo;
     private Date payTime;
     private BigDecimal amount;
     private Integer orderStatus;
     private String orderId;
     private String serialNo;
     private String payWay;
     private String type;
     private String bizpayurl;
     private String paySuccess;
     private String payUrl;
     private String remark;
     private String bankAbbr;
     private String province;
     private String city;
     private Date endTime;
     private String upOrderId;
     private Date qrTime;
     private Integer callResult;
     private Integer matching;
     private Integer operator;//运营商 1移动 2电信 3联通
     private Integer rotation;

    // Constructors

    /** default constructor */
    public MobileOrders() {
    }


    /** full constructor */
    public MobileOrders(NumberPool numberPool, BigDecimal chargeMoney, Date systemTime, String phoneNo, Date payTime, BigDecimal amount, Integer orderStatus,
    		String orderId, String serialNo, String payWay, String type, String bizpayurl, String payUrl, String remark, String bankAbbr, String province, String city, Date endTime) {
        this.numberPool = numberPool;
        this.chargeMoney = chargeMoney;
        this.systemTime = systemTime;
        this.phoneNo = phoneNo;
        this.payTime = payTime;
        this.amount = amount;
        this.orderStatus = orderStatus;
        this.orderId = orderId;
        this.serialNo = serialNo;
        this.payWay = payWay;
        this.type = type;
        this.bizpayurl = bizpayurl;
//        this.noticeStatus = noticeStatus;
        this.payUrl = payUrl;
        this.remark = remark;
        this.bankAbbr = bankAbbr;
        this.province = province;
        this.city = city;
        this.endTime = endTime;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="mobile_orders_id", unique=true, nullable=false, length=36)
    public String getMobileOrdersId() {
        return this.mobileOrdersId;
    }

    public void setMobileOrdersId(String mobileOrdersId) {
        this.mobileOrdersId = mobileOrdersId;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="number_pool_id")

    public NumberPool getNumberPool() {
        return this.numberPool;
    }

    public void setNumberPool(NumberPool numberPool) {
        this.numberPool = numberPool;
    }

    @Column(name="charge_money", precision=10, scale=0)

    public BigDecimal getChargeMoney() {
        return this.chargeMoney;
    }

    public void setChargeMoney(BigDecimal chargeMoney) {
        this.chargeMoney = chargeMoney;
    }

    @Column(name="system_time", length=19)

    public Date getSystemTime() {
        return this.systemTime;
    }

    public void setSystemTime(Date systemTime) {
        this.systemTime = systemTime;
    }

    @Column(name="phone_no", length=20)

    public String getPhoneNo() {
        return this.phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    @Column(name="pay_time", length=19)

    public Date getPayTime() {
        return this.payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    @Column(name="amount", precision=10, scale=0)

    public BigDecimal getAmount() {
        return this.amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Column(name="order_status")

    public Integer getOrderStatus() {
        return this.orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Column(name="order_id", length=50)

    public String getOrderId() {
        return this.orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Column(name="serial_no", length=50)

    public String getSerialNo() {
        return this.serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    @Column(name="pay_way", length=19)

    public String getPayWay() {
        return this.payWay;
    }

    public void setPayWay(String payWay) {
        this.payWay = payWay;
    }

    @Column(name="type", length=10)

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(name="bizpayurl", length=200)

    public String getBizpayurl() {
        return this.bizpayurl;
    }

    public void setBizpayurl(String bizpayurl) {
        this.bizpayurl = bizpayurl;
    }

//    @Column(name="notice_status")
//
//    public Integer getNoticeStatus() {
//        return this.noticeStatus;
//    }
//
//    public void setNoticeStatus(Integer noticeStatus) {
//        this.noticeStatus = noticeStatus;
//    }

    @Column(name="pay_url", length=120)

    public String getPayUrl() {
        return this.payUrl;
    }

    public void setPayUrl(String payUrl) {
        this.payUrl = payUrl;
    }

    @Column(name="remark", length=120)

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name="bank_abbr", length=10)

    public String getBankAbbr() {
        return this.bankAbbr;
    }

    public void setBankAbbr(String bankAbbr) {
        this.bankAbbr = bankAbbr;
    }

    @Column(name="province", length=20)

    public String getProvince() {
        return this.province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Column(name="city", length=20)

    public String getCity() {
        return this.city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Column(name="end_time", length=19)

    public Date getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Column(name="up_order_id")
	public String getUpOrderId() {
		return upOrderId;
	}

	public void setUpOrderId(String upOrderId) {
		this.upOrderId = upOrderId;
	}

	@Column(name="qr_time")
	public Date getQrTime() {
		return qrTime;
	}


	public void setQrTime(Date qrTime) {
		this.qrTime = qrTime;
	}


	@Column(name="call_result")
	public Integer getCallResult() {
		return callResult;
	}


	public void setCallResult(Integer callResult) {
		this.callResult = callResult;
	}


	@Column(name="matching")
	public Integer getMatching() {
		return matching;
	}


	public void setMatching(Integer matching) {
		this.matching = matching;
	}

	@Column(name="pay_success")
	public String getPaySuccess() {
		return paySuccess;
	}


	public void setPaySuccess(String paySuccess) {
		this.paySuccess = paySuccess;
	}


	@Column(name="operator")
	public Integer getOperator() {
		return operator;
	}


	public void setOperator(Integer operator) {
		this.operator = operator;
	}


	@Column(name="rotation")
	public Integer getRotation() {
		return rotation;
	}


	public void setRotation(Integer rotation) {
		this.rotation = rotation;
	}


	@Override
	public String toString() {
		return "MobileOrders [mobileOrdersId=" + mobileOrdersId +   ", chargeMoney="
				+ chargeMoney + ", systemTime=" + systemTime + ", phoneNo=" + phoneNo + ", payTime=" + payTime
				+ ", amount=" + amount + ", orderStatus=" + orderStatus + ", orderId=" + orderId + ", serialNo="
				+ serialNo + ", payWay=" + payWay + ", type=" + type + ", bizpayurl=" + bizpayurl +
				", payUrl=" + payUrl + ", remark=" + remark + ", bankAbbr=" + bankAbbr + ", province="
				+ province + ", city=" + city + ", endTime=" + endTime + ", upOrderId=" + upOrderId + ", qrTime="
				+ qrTime + ", callResult=" + callResult +   ", matching=" + matching + "]";
	}







}
